[GST gvawatermark] Add inclusive/exclusive label filtering#619
[GST gvawatermark] Add inclusive/exclusive label filtering#619walidbarakat merged 2 commits intomainfrom
Conversation
docs/source/elements/gvawatermark.md
Outdated
| displ-cfg=font-scale=1.5,thickness=3,color-idx=2,font-type=complex,draw-txt-bg=true | ||
|
|
||
| # Show only specific object types | ||
| displ-cfg=include-labels=person:car:truck |
There was a problem hiding this comment.
I opt for changing the params names
include-labels -> show-labels
exclude-labels -> hide-labels
| prims.reserve(video_frame_rois.size()); | ||
| // Prepare primitives for all ROIs | ||
| for (auto &roi : video_frame_rois) { | ||
| if (is_ROI_filtered_out(roi.label())) |
There was a problem hiding this comment.
Move this to preparePrimsForRoi method to avoid getting flickering displ-avgfps data when enabled
docs/source/elements/gvawatermark.md
Outdated
| - All other detected objects will be hidden | ||
| - Useful for focusing on specific object types | ||
|
|
||
| e.g `displCfg=include-labels=car` |
There was a problem hiding this comment.
not 'displCfg' but ' displ-cfg'
dded12f to
6293e1e
Compare
| } | ||
| cfg.erase(iter); | ||
| } | ||
| if (iter = cfg.find("show-labels"); iter != cfg.end()) { |
There was a problem hiding this comment.
It will not work with original show-labels param.
So, extend original show-label ln1180 about parsing filter config.
And move hide-labels part under if (_displCfg.show_labels) statement
There was a problem hiding this comment.
it will work because find() is looking for first occurrence only, and then erase makes sure the found string isn't to be found again.
i think better to be more specific and instead of show[hide]-labels we can use show[hide]-roi
we don't need to add extra check or logical grouping between labels and ROI highlighting as one can configured without the other
| "script_simplex, script_complex), default triplex\n" \ | ||
| "\t\t\tdraw-txt-bg=<bool> enable or disable displaying text labels background, by enabling it the text color " \ | ||
| "is set to white, default false\n" \ | ||
| "\t\t\tinclude-labels=<string> colon-separated list of labels to include (only these objects will be shown), " \ |
There was a problem hiding this comment.
my bad, regex mistake
Implement object label filtering functionality that allows users to control which detected objects are highlighted with watermark based on their classification labels. - Add include-labels and exclude-labels parameters to displ-cfg - Support colon-delimited label specification (e.g., "person:car:bicycle") - Precedence logic where inclusion filters above exclusion filters - Add parseFilterConfig utility function for label parsing - Update documentation with filtering parameter usage examples Signed-off-by: Walid <walid.aly@intel.com>
update licence header for utils implementation files. Signed-off-by: Walid <walid.aly@intel.com>
6293e1e to
1d40e7b
Compare
Description
Implement object label filtering functionality that allows users to control which detected objects are highlighted with watermark based on their classification labels.
Checklist: